﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework; 
using Microsoft.Xna.Framework.Graphics; 

namespace DesertEagleQuest
{
    class ScoreZoom
    {

        #region Declarations

        public string Text;
        public Color DrawColor;
        private int displayCounter; 
        private int maxDisplayCount = 50; 
        private float scale = 0.05f; 
        private float lastScaleAmount = 0.0f; 
        private float scaleAmount = 0.05f;

        #endregion

        #region Getter /Setter

        public float Scale
        {
            get { return scaleAmount * displayCounter; }
        }

        public bool IsCompleted
        {
            get { return (displayCounter > maxDisplayCount); }
        }

        #endregion 

        #region Constructor & Update

        public ScoreZoom(string displayText, Color fontColor)
        {
            Text = displayText;
            DrawColor = fontColor;
            displayCounter = 0; 
        }

        public void Update()
        {
            scale += lastScaleAmount + scaleAmount;
            lastScaleAmount += scaleAmount;
            displayCounter++;
        }

        #endregion 
    }
}
